Many circuits contain comparators that compare two digital numbers. For example, cache memory systems compare requested addresses with tags of data stored in the cache, and arithmetic units compare two numbers for a variety of reasons. When comparing two digital numbers, the number of bits that are different between two numbers is commonly referred to as the logical distance between the numbers.
In a typical comparator, the inputs consist only of the bits that represent two digital numbers to be compared. When the compared numbers have a logical distance of one, only one input drives the result output. For example, in a domino implementation where the output of the compare circuit is the output of a wired-OR configuration of transistors, the output of each bit comparison is coupled to a pull down transistor. Each pull down transistor is coupled between the output node and ground to pull the voltage level of the output node to ground at the appropriate times. When there is a logical distance of one between two numbers, only one pull down transistor is turned on.
Alternatively, a static implementation may also be used where the wired-OR configuration is replaced by a static OR gate. A static implementation works in a manner similar to the domino implementation discussed above except that each bit comparison output has associated with it a pull up transistor and a pull down transistor. When two differing bits are compared, the associated pull up transistor is turned off and the associated pull down transistor is turned on. When only one bit differs, only one transistor is used to pull down the output node.
Thus, the logical distance between two numbers is equivalent to the number of pull down transistors turned on to discharge the output node. A logical distance of one is the slowest case because only a single transistor is turned on the discharge the output node. Therefore, it would be desirable to have a comparator wherein the minimum logical distance between any two numbers as seen by the comparator is two.